﻿using System;
using SqlSugar;

namespace WucCloud.Entity
{
    /// <summary>
    /// 公共自定义实体拓展类
    /// </summary>
    public abstract class BaseEntity<TKey> : IBaseEntity<TKey>
    {
        /// <summary>
        /// 主键Id
        /// </summary>      
        [SugarColumn(IsPrimaryKey = true, ColumnDataType = "nvarchar(50)", ColumnDescription = "主键Id" )]
        public virtual TKey KeyId { get; set; }
        /// <summary>
        /// 排序
        /// </summary>
        [SugarColumn(IsIdentity = true,ColumnName = "Seq", ColumnDescription = "排序")]
        public virtual int? Seq { get; set; }
        /// <summary>
        /// 备注
        /// </summary>
        [SugarColumn(IsNullable = true, ColumnName = "Description", ColumnDataType = "nvarchar(max)", ColumnDescription = "备注")]
        public virtual string Description { get; set; }
        /// <summary>
        /// 是否删除
        /// </summary>
        [SugarColumn(IsNullable = true, ColumnName = "IsDeleted", ColumnDescription = "是否删除")]
        public virtual bool? IsDeleted { get; set; }
        /// <summary>
        /// 是否有效
        /// </summary>
        [SugarColumn(IsNullable = true, ColumnName = "IsEnabled", ColumnDescription = "是否有效")]
        public virtual bool? IsEnabled { get; set; }
        /// <summary>
        /// 创建时间
        /// </summary>
        [SugarColumn(IsNullable = true, ColumnName = "CreateTime", ColumnDescription = "创建时间")]
        public virtual DateTime? CreateTime { get; set; }
        /// <summary>
        /// 创建人Id
        /// </summary>
        [SugarColumn(IsNullable = true, ColumnName = "CreateUserId", ColumnDataType = "nvarchar(50)", ColumnDescription = "创建人Id")]
        public virtual string CreateUserId { get; set; }
        /// <summary>
        /// 创建人姓名
        /// </summary>
        [SugarColumn(IsNullable = true, ColumnName = "CreateUserName", ColumnDataType = "nvarchar(50)", ColumnDescription = "创建人")]
        public virtual string CreateUserName { get; set; }
        /// <summary>
        /// 修改时间
        /// </summary>
        [SugarColumn(IsNullable = true, ColumnName = "UpdateTime", ColumnDescription = "修改时间")]
        public virtual DateTime? UpdateTime { get; set; }
        /// <summary>
        /// 修改人Id
        /// </summary>
        [SugarColumn(IsNullable = true, ColumnName = "UpdateUserId", ColumnDataType = "nvarchar(50)", ColumnDescription = "修改人Id")]
        public virtual string UpdateUserId { get; set; }
        /// <summary>
        /// 修改人姓名
        /// </summary>
        [SugarColumn(IsNullable = true, ColumnName = "UpdateUserName", ColumnDataType = "nvarchar(50)", ColumnDescription = "修改人")]
        public virtual string UpdateUserName { get; set; }
        /// <summary>
        /// 删除时间
        /// </summary>
        [SugarColumn(IsNullable = true, ColumnName = "DeleteTime", ColumnDescription = "删除时间")]
        public virtual DateTime? DeletedTime { get; set; }
        /// <summary>
        /// 删除人Id
        /// </summary>
        [SugarColumn(IsNullable = true, ColumnName = "DeleteUserId", ColumnDataType = "nvarchar(50)", ColumnDescription = "删除人Id")]
        public virtual string DeletedUserId { get; set; }
        /// <summary>
        /// 删除人姓名
        /// </summary>
        [SugarColumn(IsNullable = true, ColumnName = "DeleteUserName", ColumnDataType = "nvarchar(50)", ColumnDescription = "删除人")]
        public virtual string DeleteUserName { get; set; }
    }
}
